<?php namespace App\Http\Requests;

class ChangeUserInfoRequest extends Request{

    public function authorize()
    {
        return true;
    }

    public function attributes()
    {
        return [
            'realname'  => '真实姓名',
            'wechat'    => '微信',
            'weibo'     => '微博',
            'maimai'    => '脉脉',
            'edu_school'=> '毕业院校',
            'position'  => '职位',
            'user_desc' => '用户描述',
            'email'     => '用户邮箱',
            'phone'     => '手机号'
        ];
    }


    public function rules()
    {
        return [
            'realname'  => 'required',
            'wechat'    => 'string',
            'weibo'     => 'string',
            'maimai'    => 'string',
            'edu_school'=> 'string',
            'position'  => 'string',
            'user_desc' => 'string',
            'email'     => 'string',
            'phone'     => 'regex:/1\d{10}/'
        ];
    }
}